<%@page import="doan.quanlycanbo.portlet.service.hochamLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil" %>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.theme.ThemeDisplay"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="java.util.List"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>

<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="doan.quanlycanbo.portlet.util.PortletKeysExt" %>

<%@page import="doan.quanlycanbo.portlet.model.capuy" %>
<%@page import="doan.quanlycanbo.portlet.service.capuyLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.danhhieu" %>
<%@page import="doan.quanlycanbo.portlet.service.danhhieuLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.dantoc" %>
<%@page import="doan.quanlycanbo.portlet.service.dantocLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.giaoducphothong" %>
<%@page import="doan.quanlycanbo.portlet.service.giaoducphothongLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.hesoluong" %>
<%@page import="doan.quanlycanbo.portlet.service.hesoluongLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.hocham" %>
<%@page import="doan.quanlycanbo.portlet.service.hochamLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.hocvi" %>
<%@page import="doan.quanlycanbo.portlet.service.hocviLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.khoidonviquanly" %>
<%@page import="doan.quanlycanbo.portlet.service.khoidonviquanlyLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.ngachluong" %>
<%@page import="doan.quanlycanbo.portlet.service.ngachluongLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.tongiao" %>
<%@page import="doan.quanlycanbo.portlet.service.tongiaoLocalServiceUtil" %>
<%@page import="doan.quanlycanbo.portlet.model.xuatthan" %>
<%@page import="doan.quanlycanbo.portlet.service.xuatthanLocalServiceUtil" %>


<portlet:defineObjects/>
<liferay-theme:defineObjects />

<%
	PortletURL renderTabGeneralURL = renderResponse.createRenderURL();
	renderTabGeneralURL.setParameter("jspPage", "/html/manage_employee/view.jsp?tab1=tab.qlcb.qlychung");
	String tabs2Names = "khoidonvi,hocham,hocvi,capuy,danhhieu,dantoc,tongiao,xuatthan,giaoducphothong,ngachluong,hesoluong";
%>
<liferay-ui:tabs names="<%= tabs2Names %>" param="tab2" url="<%=portletURL.toString()%>"/>

<c:choose>

<c:when test='<%= tab2.equals("hocham") %>'>
<!-- Quản lý học hàm -->
<portlet:renderURL windowState="normal" var="themHocHamURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%= String.valueOf(PortletKeysExt.ADD_HOCHAM) %>"/>
</portlet:renderURL>

<input value="Them Hoc ham" type="button"  onClick="window.location.href='<%=themHocHamURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<hocham> hochamList = hochamLocalServiceUtil.getAll();
 			results = ListUtil.subList(hochamList, searchContainer.getStart(), searchContainer.getEnd());
 			total = hochamList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.hocham" keyProperty="mahocham" modelVar="hocHam">
		<liferay-ui:search-container-column-text name="Hoc ham" property="tenhocham"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_HOCHAM)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("hocvi") %>'>
<portlet:renderURL windowState="normal" var="themHocViURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_HOCVI)%>"/>
</portlet:renderURL>

<input value="Them Hoc vi" type="button"  onClick="window.location.href='<%=themHocViURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<hocvi> hocviList = hocviLocalServiceUtil.getAll();
 			results = ListUtil.subList(hocviList, searchContainer.getStart(), searchContainer.getEnd());
 			total = hocviList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.hocvi" keyProperty="mahocvi" modelVar="hocVi">
		<liferay-ui:search-container-column-text name="Hoc vi" property="tenhocvi"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_HOCVI)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("capuy") %>'>
<portlet:renderURL windowState="normal" var="themCapUyURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_CAPUY)%>"/>
</portlet:renderURL>

<input value="Them Cap Uy" type="button"  onClick="window.location.href='<%=themCapUyURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<capuy> capuyList = capuyLocalServiceUtil.getAll();
 			results = ListUtil.subList(capuyList, searchContainer.getStart(), searchContainer.getEnd());
 			total = capuyList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.capuy" keyProperty="macapuy" modelVar="capUy">
		<liferay-ui:search-container-column-text name="Cap uy" property="tencapuy"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_CAPUY)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("danhhieu") %>'>
<portlet:renderURL windowState="normal" var="themDanhHieuURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_DANHHIEU)%>"/>
</portlet:renderURL>

<input value="Them Danh Hieu" type="button"  onClick="window.location.href='<%=themDanhHieuURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<danhhieu> danhhieuList = danhhieuLocalServiceUtil.getAll();
 			results = ListUtil.subList(danhhieuList, searchContainer.getStart(), searchContainer.getEnd());
 			total = danhhieuList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.danhhieu" keyProperty="madanhhieu" modelVar="danhHieu">
		<liferay-ui:search-container-column-text name="Danh hieu" property="tendanhhieu"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_DANHHIEU)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("dantoc") %>'>
<portlet:renderURL windowState="normal" var="themDanTocURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_DANTOC)%>"/>
</portlet:renderURL>

<input value="Them Dan Toc" type="button"  onClick="window.location.href='<%=themDanTocURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<dantoc> dantocList = dantocLocalServiceUtil.getAll();
 			results = ListUtil.subList(dantocList, searchContainer.getStart(), searchContainer.getEnd());
 			total = dantocList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.dantoc" keyProperty="madantoc" modelVar="danToc">
		<liferay-ui:search-container-column-text name="Dan Toc" property="tendantoc"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_DANTOC)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("tongiao") %>'>
<portlet:renderURL windowState="normal" var="themTonGiaoURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_TONGIAO)%>"/>
</portlet:renderURL>

<input value="Them Ton Giao" type="button"  onClick="window.location.href='<%=themTonGiaoURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<tongiao> tongiaoList = tongiaoLocalServiceUtil.getAll();
 			results = ListUtil.subList(tongiaoList, searchContainer.getStart(), searchContainer.getEnd());
 			total = tongiaoList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.tongiao" keyProperty="matongiao" modelVar="tonGiao">
		<liferay-ui:search-container-column-text name="Ton Giao" property="tentongiao"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_TONGIAO)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("xuatthan") %>'>
<portlet:renderURL windowState="normal" var="themXuatthanURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_XUATTHAN)%>"/>
</portlet:renderURL>

<input value="Them Xuat Than" type="button"  onClick="window.location.href='<%=themXuatthanURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<xuatthan> xuatthanList = xuatthanLocalServiceUtil.getAll();
 			results = ListUtil.subList(xuatthanList, searchContainer.getStart(), searchContainer.getEnd());
 			total = xuatthanList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.xuatthan" keyProperty="maxuatthan" modelVar="xuatThan">
		<liferay-ui:search-container-column-text name="Xuat Than" property="tenxuatthan"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_XUATTHAN)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("giaoducphothong") %>'>
<portlet:renderURL windowState="normal" var="themGDPTURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_GDPT)%>"/>
</portlet:renderURL>

<input value="Them Giao duc pho thong" type="button"  onClick="window.location.href='<%=themGDPTURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<giaoducphothong> gdptList = giaoducphothongLocalServiceUtil.getAll();
 			results = ListUtil.subList(gdptList, searchContainer.getStart(), searchContainer.getEnd());
 			total = gdptList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.giaoducphothong" keyProperty="magdpt" modelVar="gdpt">
		<liferay-ui:search-container-column-text name="Giao duc pho thong" property="tengdpt"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_GDPT)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("ngachluong") %>'>
<portlet:renderURL windowState="normal" var="themNgachLuongURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_NGACHLUONG)%>"/>
</portlet:renderURL>

<input value="Them Ngach luong" type="button"  onClick="window.location.href='<%=themNgachLuongURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<ngachluong> ngachluongList = ngachluongLocalServiceUtil.getAll();
 			results = ListUtil.subList(ngachluongList, searchContainer.getStart(), searchContainer.getEnd());
 			total = ngachluongList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.ngachluong" keyProperty="mabangngachluong" modelVar="ngachLuong">
		<liferay-ui:search-container-column-text name="Ma ngach luong" property="mangachluong"/>
		<liferay-ui:search-container-column-text name="Ngach luong" property="tenngachluong"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_NGACHLUONG)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:when test='<%= tab2.equals("hesoluong") %>'>
<portlet:renderURL windowState="normal" var="themHeSoLuongURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%=  String.valueOf(PortletKeysExt.ADD_HESOLUONG)%>"/>
</portlet:renderURL>

<input value="Them He so luong" type="button"  onClick="window.location.href='<%=themHeSoLuongURL.toString()  %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<hesoluong> hesoluongList = hesoluongLocalServiceUtil.getAll();
 			results = ListUtil.subList(hesoluongList, searchContainer.getStart(), searchContainer.getEnd());
 			total = hesoluongList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.hesoluong" keyProperty="mahesoluong" modelVar="hsl">
		<liferay-ui:search-container-column-text name="He so luong" property="hesoluong"/>
		<liferay-ui:search-container-column-text name="Bac luong" property="bacluong"/>
		<liferay-ui:search-container-column-text name="Ngach luong" value="<%= ngachluongLocalServiceUtil.getByMaNgachLuong(hsl.getMangachluong()).getTenngachluong() %>"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_HESOLUONG)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
</c:when>

<c:otherwise>
<!-- Quản lý Khối đơn vị -->
<portlet:renderURL windowState="normal" var="themKhoiDVURL">
	<portlet:param name="jspPage" value="/html/manage_employee/general_manage/add_general.jsp"/>
	<portlet:param name="typeGeneral" value="<%= String.valueOf(PortletKeysExt.ADD_KHOIDV)%>"/>
</portlet:renderURL>

<input value="Them Khoi DV" type="button"  onClick="window.location.href='<%=themKhoiDVURL.toString() %>' " />
<br/><br/>
<liferay-ui:search-container emptyResultsMessage="No data" delta="15"iteratorURL="<%= renderTabGeneralURL %>">
	<liferay-ui:search-container-results>
		<%
 			List<khoidonviquanly> kdvList = khoidonviquanlyLocalServiceUtil.getAll();
 			results = ListUtil.subList(kdvList, searchContainer.getStart(), searchContainer.getEnd());
 			total = kdvList.size();
 			pageContext.setAttribute("results", results);
 			pageContext.setAttribute("total", total);
		 %>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.khoidonviquanly" keyProperty="makhoi" modelVar="khoiDV">
		<liferay-ui:search-container-column-text name="Ten Khoi" property="tenkhoi"/>
		<liferay-ui:search-container-row-parameter name="typeGeneral" value="<%=String.valueOf(PortletKeysExt.ADD_KHOIDV)%>"/>
		<liferay-ui:search-container-column-jsp path="/html/manage_employee/general_manage/actions_general.jsp" align="right"/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>
<br/>
</c:otherwise>
</c:choose>








